package com.soft.app.ruanba;

import java.util.concurrent.LinkedBlockingQueue;

import com.soft.webharvest.util.ConfigFactory;

// Referenced classes of package com.halftouch.webharvest.alibaba:
//			ExtractJob, ParseJob, DbJob

public class RuanBaMain
{

	private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(RuanBaMain.class);
	public static final java.lang.String CONFIG = "ruanba_nofile.properties";
	public static final java.lang.String APPCODE = "ali";
	public static boolean local;
	public static boolean running;
	public static java.lang.String prefix;

	public RuanBaMain()
	{
	}

	public static void main(java.lang.String args[])
		throws java.io.IOException
	{
		ConfigFactory.Config cconfig = ConfigFactory.getConfig("ruanba_nofile.properties");
		ExtractJob job = new ExtractJob(cconfig, prefix, local);
		job.extract();
		java.lang.String DestDir = cconfig.getProperty((new StringBuilder()).append(prefix).append("destDir").toString());
		if (org.apache.commons.lang.StringUtils.isBlank(DestDir))
		{
			log.info("DestDir is null");
			java.lang.System.exit(-1);
		}
		java.util.concurrent.LinkedBlockingQueue queue = new LinkedBlockingQueue(100);
		//ParseJob pj = new ParseJob(queue, DestDir);
		//pj.start();
		
	}

	static 
	{
		java.lang.String os = java.lang.System.getProperty("os.name");
		local = !"Linux".equals(os);
		java.lang.StringBuilder builder = new StringBuilder();
		builder.append(local ? "local" : "server").append(".").append("ali").append(".");
		prefix = builder.toString();
	}
}
